home *** CD-ROM | disk | FTP | other *** search
/ Shareware Grab Bag / Shareware Grab Bag.iso / 007 / xlisp2.arc / XLFTAB.C < prev    next >
Text File  |  1985-01-01  |  6KB  |  204 lines

  1. /* xlftab.c - xlisp function table */
  2.  
  3. #include "xlisp.h"
  4.  
  5. /* external functions */
  6. extern NODE
  7.     *xeval(),*xapply(),*xfuncall(),*xquote(),*xbquote(),
  8.     *xset(),*xsetq(),*xsetf(),*xdefun(),*xdefmacro(),
  9.     *xgensym(),*xmakesymbol(),*xintern(),
  10.     *xsymname(),*xsymvalue(),*xsymplist(),*xget(),*xremprop(),
  11.     *xcar(),*xcaar(),*xcadr(),*xcdr(),*xcdar(),*xcddr(),
  12.     *xcons(),*xlist(),*xappend(),*xreverse(),*xlast(),*xnth(),*xnthcdr(),
  13.     *xmember(),*xassoc(),*xsubst(),*xsublis(),*xremove(),*xlength(),
  14.     *xmapc(),*xmapcar(),*xmapl(),*xmaplist(),
  15.     *xrplca(),*xrplcd(),*xnconc(),*xdelete(),
  16.     *xatom(),*xsymbolp(),*xnumberp(),*xboundp(),*xnull(),*xlistp(),*xconsp(),
  17.     *xeq(),*xeql(),*xequal(),
  18.     *xcond(),*xand(),*xor(),*xlet(),*xletstar(),*xif(),
  19.     *xprog(),*xprogstar(),*xprog1(),*xprog2(),*xprogn(),*xgo(),*xreturn(),
  20.     *xcatch(),*xthrow(),
  21.     *xerror(),*xcerror(),*xbreak(),*xerrset(),*xbaktrace(),*xevalhook(),
  22.     *xdo(),*xdostar(),*xdolist(),*xdotimes(),
  23.     *xadd(),*xsub(),*xmul(),*xdiv(),*xrem(),*xmin(),*xmax(),*xabs(),
  24.     *xadd1(),*xsub1(),*xbitand(),*xbitior(),*xbitxor(),*xbitnot(),
  25.     *xminusp(),*xzerop(),*xplusp(),*xevenp(),*xoddp(),
  26.     *xlss(),*xleq(),*xequ(),*xneq(),*xgeq(),*xgtr(),
  27.     *xstrlen(),*xstrcat(),*xsubstr(),*xascii(),*xchr(),*xatoi(),*xitoa(),
  28.     *xread(),*xprint(),*xprin1(),*xprinc(),*xterpri(),
  29.     *xflatsize(),*xflatc(),*xexplode(),*xexplc(),*ximplode(),*xmaknam(),
  30.     *xopeni(),*xopeno(),*xclose(),*xrdchar(),*xpkchar(),*xwrchar(),*xreadline(),
  31.     *xload(),*xgc(),*xexpand(),*xalloc(),*xmem(),*xtype(),*xexit();
  32.  
  33. struct fdef ftab[] = {
  34.  
  35.     /* evaluator functions */
  36.     "eval",        SUBR,    xeval,
  37.     "apply",    SUBR,    xapply,
  38.     "funcall",    SUBR,    xfuncall,
  39.     "quote",    FSUBR,    xquote,
  40.     "function",    FSUBR,    xquote,
  41.     "backquote",    FSUBR,    xbquote,
  42.  
  43.     /* symbol functions */
  44.     "set",        SUBR,    xset,
  45.     "setq",        FSUBR,    xsetq,
  46.     "setf",        FSUBR,    xsetf,
  47.     "defun",    FSUBR,    xdefun,
  48.     "defmacro",    FSUBR,    xdefmacro,
  49.     "gensym",    SUBR,    xgensym,
  50.     "make-symbol",    SUBR,    xmakesymbol,
  51.     "intern",    SUBR,    xintern,
  52.     "symbol-name",    SUBR,    xsymname,
  53.     "symbol-value",    SUBR,    xsymvalue,
  54.     "symbol-plist",    SUBR,    xsymplist,
  55.     "get",        SUBR,    xget,
  56.     "remprop",    SUBR,    xremprop,
  57.  
  58.     /* list functions */
  59.     "car",        SUBR,    xcar,
  60.     "caar",        SUBR,    xcaar,
  61.     "cadr",        SUBR,    xcadr,
  62.     "cdr",        SUBR,    xcdr,
  63.     "cdar",        SUBR,    xcdar,
  64.     "cddr",        SUBR,    xcddr,
  65.     "cons",        SUBR,    xcons,
  66.     "list",        SUBR,    xlist,
  67.     "append",    SUBR,    xappend,
  68.     "reverse",    SUBR,    xreverse,
  69.     "last",        SUBR,    xlast,
  70.     "nth",        SUBR,    xnth,
  71.     "nthcdr",    SUBR,    xnthcdr,
  72.     "member",    SUBR,    xmember,
  73.     "assoc",    SUBR,    xassoc,
  74.     "subst",    SUBR,    xsubst,
  75.     "sublis",    SUBR,    xsublis,
  76.     "remove",    SUBR,    xremove,
  77.     "length",    SUBR,    xlength,
  78.     "mapc",        SUBR,    xmapc,
  79.     "mapcar",    SUBR,    xmapcar,
  80.     "mapl",        SUBR,    xmapl,
  81.     "maplist",    SUBR,    xmaplist,
  82.  
  83.     /* destructive list functions */
  84.     "rplaca",    SUBR,    xrplca,
  85.     "rplacd",    SUBR,    xrplcd,
  86.     "nconc",    SUBR,    xnconc,
  87.     "delete",    SUBR,    xdelete,
  88.  
  89.     /* predicate functions */
  90.     "atom",        SUBR,    xatom,
  91.     "symbolp",    SUBR,    xsymbolp,
  92.     "numberp",    SUBR,    xnumberp,
  93.     "boundp",    SUBR,    xboundp,
  94.     "null",        SUBR,    xnull,
  95.     "not",        SUBR,    xnull,
  96.     "listp",    SUBR,    xlistp,
  97.     "consp",    SUBR,    xconsp,
  98.     "minusp",    SUBR,    xminusp,
  99.     "zerop",    SUBR,    xzerop,
  100.     "plusp",    SUBR,    xplusp,
  101.     "evenp",    SUBR,    xevenp,
  102.     "oddp",        SUBR,    xoddp,
  103.     "eq",        SUBR,    xeq,
  104.     "eql",        SUBR,    xeql,
  105.     "equal",    SUBR,    xequal,
  106.  
  107.     /* control functions */
  108.     "cond",        FSUBR,    xcond,
  109.     "and",        FSUBR,    xand,
  110.     "or",        FSUBR,    xor,
  111.     "let",        FSUBR,    xlet,
  112.     "let*",        FSUBR,    xletstar,
  113.     "if",        FSUBR,    xif,
  114.     "prog",        FSUBR,    xprog,
  115.     "prog*",    FSUBR,    xprogstar,
  116.     "prog1",    FSUBR,    xprog1,
  117.     "prog2",    FSUBR,    xprog2,
  118.     "progn",    FSUBR,    xprogn,
  119.     "go",        FSUBR,    xgo,
  120.     "return",    SUBR,    xreturn,
  121.     "do",        FSUBR,    xdo,
  122.     "do*",        FSUBR,    xdostar,
  123.     "dolist",    FSUBR,    xdolist,
  124.     "dotimes",    FSUBR,    xdotimes,
  125.     "catch",    FSUBR,    xcatch,
  126.     "throw",    SUBR,    xthrow,
  127.  
  128.     /* debugging and error handling functions */
  129.     "error",    SUBR,    xerror,
  130.     "cerror",    SUBR,    xcerror,
  131.     "break",    SUBR,    xbreak,
  132.     "errset",    FSUBR,    xerrset,
  133.     "baktrace",    SUBR,    xbaktrace,
  134.     "evalhook",    SUBR,    xevalhook,
  135.  
  136.     /* arithmetic functions */
  137.     "+",        SUBR,    xadd,
  138.     "-",        SUBR,    xsub,
  139.     "*",        SUBR,    xmul,
  140.     "/",        SUBR,    xdiv,
  141.     "1+",        SUBR,    xadd1,
  142.     "1-",        SUBR,    xsub1,
  143.     "rem",        SUBR,    xrem,
  144.     "min",        SUBR,    xmin,
  145.     "max",        SUBR,    xmax,
  146.     "abs",        SUBR,    xabs,
  147.  
  148.     /* bitwise logical functions */
  149.     "bit-and",    SUBR,    xbitand,
  150.     "bit-ior",    SUBR,    xbitior,
  151.     "bit-xor",    SUBR,    xbitxor,
  152.     "bit-not",    SUBR,    xbitnot,
  153.  
  154.     /* numeric comparison functions */
  155.     "<",        SUBR,    xlss,
  156.     "<=",        SUBR,    xleq,
  157.     "=",        SUBR,    xequ,
  158.     "/=",        SUBR,    xneq,
  159.     ">=",        SUBR,    xgeq,
  160.     ">",        SUBR,    xgtr,
  161.  
  162.     /* string functions */
  163.     "strlen",    SUBR,    xstrlen,
  164.     "strcat",    SUBR,    xstrcat,
  165.     "substr",    SUBR,    xsubstr,
  166.     "ascii",    SUBR,    xascii,
  167.     "chr",        SUBR,    xchr,
  168.     "atoi",        SUBR,    xatoi,
  169.     "itoa",        SUBR,    xitoa,
  170.  
  171.     /* I/O functions */
  172.     "read",        SUBR,    xread,
  173.     "print",    SUBR,    xprint,
  174.     "prin1",    SUBR,    xprin1,
  175.     "princ",    SUBR,    xprinc,
  176.     "terpri",    SUBR,    xterpri,
  177.     "flatsize",    SUBR,    xflatsize,
  178.     "flatc",    SUBR,    xflatc,
  179.     "explode",    SUBR,    xexplode,
  180.     "explodec",    SUBR,    xexplc,
  181.     "implode",    SUBR,    ximplode,
  182.     "maknam",    SUBR,    xmaknam,
  183.  
  184.     /* file I/O functions */
  185.     "openi",    SUBR,    xopeni,
  186.     "openo",    SUBR,    xopeno,
  187.     "close",    SUBR,    xclose,
  188.     "read-char",    SUBR,    xrdchar,
  189.     "peek-char",    SUBR,    xpkchar,
  190.     "write-char",    SUBR,    xwrchar,
  191.     "readline",    SUBR,    xreadline,
  192.  
  193.     /* system functions */
  194.     "load",        SUBR,    xload,
  195.     "gc",        SUBR,    xgc,
  196.     "expand",    SUBR,    xexpand,
  197.     "alloc",    SUBR,    xalloc,
  198.     "mem",        SUBR,    xmem,
  199.     "type",        SUBR,    xtype,
  200.     "exit",        SUBR,    xexit,
  201.  
  202.     0
  203. };
  204.